To configure the Tomcat server, follow these steps:
<Tomcat Installation Directory>/bin
startup.sh
with following parameters:Parameters (for JVM) | Required | Description |
---|---|---|
-Xmx2048m | Yes | Minimum Heap size: 2GB |
-Xms2048m | Yes | Maximum Heap size: 2GB |
-XX:MaxPermSize=512m | Yes | One fourth of the main Heap memory assigned |
-XX:+UseConcMarkSweepGC | Yes | This is a recommended setting |
-XX:HeapDumpPath | Optional | This parameter is to get Heap Dump Path |
-Dkpns.configLocation | Yes | This is the directory where the configResource.properties , database.properties , and kmslog4j2.
xml files must be placed.For example, if the location is
/data/kpns-config , then you must specify the property as -Dkpns.configLocation=/data/kpns-config |
-Dhibernate.dialect | Enables you to connect to the database. JDBC has to be configured on the AppServer level. | DB2= SQL= Oracle=
MYSQL= |
Note: -Dhibernate.dialect : This parameter mentioned in the above table is required only for Oracle database.
Example: This is a sample for above mentioned parameters.
set JAVA_OPTS="-server -Xms2048m -Xmx2048m -XX:NewSize=512m -XX:MaxNewSize=256m -XX:PermSize=512m -XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/kpns/logs/heapdumps -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dnet.spy.log.LoggerImpl=net.spy.memcached.compat.log.Log4JLogger -Dfile.encoding=UTF8 -Dkpns.configLocation=/data/kpns-config/"
-Xms2048m –Xmx2048m -Dkpns.configLocation=<path of the kpns config location extracted from kpns-resources.tar>
mysql-connector-java-5.1.26-bin.jar
to <Tomcat installation directory>/lib
<Tomcat installation directory>/conf
datasource context.xml
as given below:<Resource name="jdbc/kpnsdb" auth="Container" type="javax.sql.DataSource" scope="Shareable" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" maxActive="50" minIdle="1" maxIdle="10" testWhileIdle="true" maxWait="10000" initialSize="10" testOnBorrow="true" validationQuery="SELECT 1" removeAbandoned="false" removeAbandonedTimeout="180" logAbandoned="false" username="username" password="password" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://<host>:<port>/ <database>?autoReconnect=true& useUnicode=yes&characterEncoding=UTF-8&cachePrepStmts=true& cacheCallableStmts =true&cacheServerConfiguration=true&useLocalSessionState =true&elideSetAutoCommits =true&alwaysSendSetIsolation=false&enableQueryTimeouts=false& rewriteBatchedStatements=true&max_allowed_packet=104857600 "/>
Configuration Value | Description |
---|---|
host | Database server IP/name |
port | Database server port |
username | Database user name |
password | Database password |
database | Database name |
ojdbc6.jar
to <Tomcat installation directory>/lib
<Tomcat installation directory>/conf
datasource context.xml
as given below:<Resource name="jdbc/kpnsdb" auth="Container" type="javax.sql.DataSource" scope="Shareable" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" maxActive="30" minIdle="1" maxIdle="10" testWhileIdle="true" maxWait="10000" initialSize="10" testOnBorrow="true" validationQuery="select 1 from dual" removeAbandoned="false" removeAbandonedTimeout="180" logAbandoned="false" username="username" password="password" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@host:port:sid"/>
Configuration Value | Description |
---|---|
host | Database server IP/name |
port | Database server port |
username | Database user name |
password | Database password |
sid | Oracle service id/name |
db2jcc4.jar
to <Tomcat installation directory>/lib
<Tomcat installation directory>/conf
datasource context.xml
as given below:<Resource name="jdbc/kpnsdb" auth="Container" type="javax.sql.DataSource" scope="Shareable"factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" maxActive="30" minIdle="1" maxIdle="10" testWhileIdle="true" maxWait="10000" initialSize="10" testOnBorrow="true" validationQuery="select 1 FROM SYSIBM.SYSDUMMY1" removeAbandoned="false" removeAbandonedTimeout="180" logAbandoned="false" username="username" password="password" driverClassName="com.ibm.db2.jcc.DB2Driver" url="jdbc:db2://host:port/database:currentSchema=schemaname;progressiveStreaming=2;"/>
Configuration Value | Description |
---|---|
host | Database server IP/name |
port | Database server port |
username | Database user name |
password | Database password |
database | Database name |
schemaname | Schema name |
sqljdbc4.jar
to <Tomcat installation directory>/lib
<Tomcat installation directory>/conf
datasource context.xml
as given below.<Resource name="jdbc/kpnsdb" auth="Container" type="javax.sql.DataSource" scope="Shareable"factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" maxActive="50" minIdle="1" maxIdle="10" testWhileIdle="true" maxWait="10000" initialSize="10" testOnBorrow="true" validationQuery="SELECT 1" removeAbandoned="false" removeAbandonedTimeout="180" logAbandoned="false" username="username" password="password" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://host:port;databaseName=database;user=username; password=password;sendStringParametersAsUnicode=true;"/>
Configuration Value | Description |
---|---|
host | Database server IP/name |
port | Database server port |
username | Database user name |
password | Database password |
database | Database name |
kpns.war
file to the following location:<Tomcat installation directory>/webapps/
To start Tomcat server, post upgrade follow these steps:
<Tomcat installation directory>/work/Catalina/<host>/
kpns
folder in the above path and re-start Tomcat service.Copyright © 2015 Temenos AG. All rights reserved. |